package people;

import constants.Exptable;

public class Character extends Person {

	public int mattack, wattack;
	public int[] stats;
	public static int jobId;
	public static Character c;
	public static String name;
	public short job;
	public int x;
	public int y;

	public Character(String name, short job) {
		c = this;
		this.stats = new int[6];
		Exptable.init();
		Character.name = name;
		this.job = job;
		initStats();
		health = stats[0];
		mana = stats[1];
		if (health > stats[0]) {
			health = stats[0];
		}
	}
	
	public void initStats() {
		job = (short) jobId;
		switch ((int) job) {
			case 1:
				stats[0] = (3 * level) + 10;
				stats[1] = 20 * level;
				stats[2] = level;
				stats[3] = 2 * level;
				stats[4] = 8 * level;
				stats[5] = 4 * level;
				break;
			case 2:
				stats[0] = (20 * level) + 10;
				stats[1] = 2 * level;
				stats[2] = 10 * level;
				stats[3] = 2 * level;
				stats[4] = 0 * level;
				stats[5] = 2 * level;
				break;
			case 3:
				stats[0] = (5 * level) + 10;
				stats[1] = 3 * level;
				stats[2] = 5 * level;
				stats[3] = 6 * level;
				stats[4] = 3 * level;
				stats[5] = 10 * level;
				break;
			case 4:
				stats[0] = (7 * level) + 10;
				stats[1] = 3 * level;
				stats[2] = 4 * level;
				stats[3] = 10 * level;
				stats[4] = 2 * level;
				stats[5] = 6 * level;
				break;
		}
		health = stats[0];
	}
}
